# Lilux/RYE: Complete Implementation Roadmap
**Date:** 2026-01-28
**Version:** 0.1.0
**Status:** Master roadmap for execution
---
## Documents Created
This collection defines the complete strategy for packaging and distributing Lilux/RYE:
1. **LILUX_RYE_SPLIT.md** ✓
- Architecture of the split
- Dependency relationships
- Benefits and future possibilities
2. **PACKAGING_AND_DISTRIBUTION.md** ✓
- Packaging strategy (single `rye` package)
- Installation flow via `pipx`
- User onboarding flow
- 17-demo progression system (4 phases)
- Advanced demonstrations
3. **DEMO_STRUCTURE.md** ✓
- Detailed structure of all 17 demos
- Phase 1: Meta Tools (4 demos)
- Phase 2: Core Harness (4 demos)
- Phase 3: Advanced Orchestration (4 demos)
- Phase 4: Advanced Showcase (5 demos)
- Implementation checklist
- Demo metadata standards
4. **TECHNICAL_IMPLEMENTATION.md** ✓
- Repository structure migration
- Package configuration (pyproject.toml)
- Import migration (kiwi_mcp → lilux)
- MCP server setup
- Content bundling
- User space initialization
- Testing strategy
- Versioning & compatibility
- Distribution checklist
5. **USER_GUIDE.md** ✓
- Quick start (5 minutes)
- Understanding the system
- User space structure
- Creating directives
- State files & persistence
- Knowledge learning system
- Demo walkthroughs
- Common workflows
- Best practices
- Troubleshooting
---
## Implementation Phases
### Phase 0: Preparation (1-2 weeks)
#### 0.1: Code Refactoring
- [ ] Copy `kiwi_mcp/` → `lilux/`
- [ ] Update all imports: `kiwi_mcp` → `lilux`
- [ ] Update all documentation references
- [ ] Verify all tests pass with new names
- [ ] Create compatibility layer (keep `kiwi_mcp` re-exporting for 0.1.0 only)
#### 0.2: Package Configuration
- [ ] Create `pyproject.toml` (see TECHNICAL_IMPLEMENTATION.md)
- [ ] Create `setup.py` for setuptools
- [ ] Create `MANIFEST.in` to include `.ai/`
- [ ] Update `__init__.py` with version info
- [ ] Verify `.ai/` is bundled in wheel builds
#### 0.3: CLI Structure
- [ ] Create `lilux/cli/` module
- [ ] Implement `lilux serve` command
- [ ] Implement `rye-init` command
- [ ] Implement `rye-demo` command
- [ ] Test entry points work
#### 0.4: Testing
- [ ] Test package builds: `python -m build`
- [ ] Test bundling: verify `.ai/` in wheel
- [ ] Test installation: `pip install dist/rye-*.whl`
- [ ] Test entry points: commands available
- [ ] Test content access: core directives load
**Deliverable:** Complete package ready to build
---
### Phase 1: Foundation (Weeks 3-4)
#### 1.1: Core Infrastructure
- [ ] User space initialization
- [ ] Environment detection
- [ ] Directory creation
- [ ] Config generation
- [ ] Logging setup
#### 1.2: MCP Server
- [ ] Server bootstrap
- [ ] 4 core tools working
- [ ] Environment variable handling
- [ ] Error handling
#### 1.3: Core Directives
- [ ] `core/init` directive (fully functional)
- [ ] `core/help` directive
- [ ] Directive loading and execution
- [ ] Metadata extraction
#### 1.4: Phase 1 Demos
- [ ] `core/demo_search_directives`
- [ ] `core/demo_load_directives`
- [ ] `core/demo_create_directives`
- [ ] `core/demo_execute_sign`
#### 1.5: Testing & Docs
- [ ] Integration tests for Phase 1
- [ ] User guide Phase 1 section
- [ ] Quick start guide
- [ ] Installation instructions
**Deliverable:** `rye` 0.1.0 released on PyPI
---
### Phase 2: Harness (Weeks 5-6)
#### 2.1: Permission System
- [ ] Permission token implementation
- [ ] Capability registry
- [ ] Permission checking in execution
- [ ] Approval workflows
#### 2.2: State Files
- [ ] State file format (YAML/JSON)
- [ ] Read/write operations
- [ ] Persistence management
- [ ] Version tracking
#### 2.3: Knowledge System
- [ ] Knowledge entry creation
- [ ] Frontmatter parsing
- [ ] Relationship tracking
- [ ] Evolution/mutation support
#### 2.4: Hooks & Plugins
- [ ] Pre/post execution hooks
- [ ] Plugin registration
- [ ] Event handlers
- [ ] Integration points
#### 2.5: Phase 2 Demos
- [ ] `rye/demo_permissions_cost`
- [ ] `rye/demo_state_files`
- [ ] `rye/demo_knowledge_evolution`
- [ ] `rye/demo_hooks_plugins`
#### 2.6: Testing & Docs
- [ ] State file tests
- [ ] Permission tests
- [ ] Knowledge tests
- [ ] User guide Phase 2 section
- [ ] Integration tests
**Deliverable:** `rye` 0.2.0 released
---
### Phase 3: Advanced Orchestration (Weeks 7-8)
#### 3.1: Recursion Safety
- [ ] Depth limiting
- [ ] Resource cleanup
- [ ] Timeout handling
- [ ] Guarantee termination
#### 3.2: Parallel Execution
- [ ] Spawn multiple directives
- [ ] Wait strategies
- [ ] Result aggregation
- [ ] Error handling in parallel
#### 3.3: Context Packing
- [ ] Minimal context injection
- [ ] Output format specification
- [ ] Example-driven prompting
- [ ] LLM behavior prediction
#### 3.4: Self-Evolving Systems
- [ ] Iteration loop implementation
- [ ] Learning capture
- [ ] Knowledge mutation
- [ ] Convergence patterns
#### 3.5: Phase 3 Demos
- [ ] `rye/demo_deep_recursion`
- [ ] `rye/demo_parallel_orchestration`
- [ ] `rye/demo_tight_context`
- [ ] `rye/demo_self_evolving_systems`
#### 3.6: Testing & Docs
- [ ] Orchestration pattern tests
- [ ] Performance benchmarks
- [ ] User guide Phase 3 section
- [ ] Pattern documentation
**Deliverable:** `rye` 0.3.0 released
---
### Phase 4: Advanced Showcase (Weeks 9-10)
#### 4.1: Genome Evolution
- [ ] Algorithm DNA encoding
- [ ] Fitness evaluation
- [ ] Selection strategies
- [ ] Crossover/mutation operators
#### 4.2: Proof Generation
- [ ] Formal proof structure
- [ ] Multiple proof strategies
- [ ] Verification with code
- [ ] Proof recording
#### 4.3: Software Building
- [ ] Modular decomposition
- [ ] Tight context per module
- [ ] Integration testing
- [ ] Documentation generation
#### 4.4: Multi-Agent
- [ ] Agent spawning
- [ ] Role assignment
- [ ] Message passing
- [ ] Result aggregation
#### 4.5: Version Control
- [ ] Checkpoint creation
- [ ] Branching for exploration
- [ ] Merging strategies
- [ ] Rollback capability
#### 4.6: Phase 4 Demos
- [ ] `rye/demo_genome_evolution`
- [ ] `rye/demo_proofs`
- [ ] `rye/demo_software_building`
- [ ] `rye/demo_multi_agent`
- [ ] `rye/demo_version_control`
#### 4.7: Testing & Docs
- [ ] Advanced orchestration tests
- [ ] Example code for each demo
- [ ] User guide Phase 4 section
- [ ] Comprehensive tutorials
**Deliverable:** `rye` 0.4.0 released
---
### Phase 5: Polish (Weeks 11-12)
#### 5.1: Integration
- [ ] All demos work end-to-end
- [ ] MCP integration with major platforms
- [ ] Installation on multiple OS
- [ ] Performance optimization
#### 5.2: Documentation
- [ ] Complete user guide
- [ ] API documentation
- [ ] Architecture guide
- [ ] Best practices guide
#### 5.3: Safety & Testing
- [ ] Comprehensive test suite
- [ ] Production safety harness
- [ ] Error recovery
- [ ] Resource limits
#### 5.4: Release Preparation
- [ ] Changelog generation
- [ ] Migration guide (from kiwi-mcp)
- [ ] Installation verification
- [ ] CI/CD setup
#### 5.5: Launch
- [ ] Beta users testing
- [ ] Feedback collection
- [ ] Final refinements
- [ ] Version 1.0.0 release
**Deliverable:** `rye` 1.0.0 released, production-ready
---
## Key Milestones
| Date | Milestone | Version | Status |
|------|-----------|---------|--------|
| Week 2 | Refactoring complete | - | Planning |
| Week 3 | Phase 1 complete | 0.1.0 | First PyPI release |
| Week 4 | Phase 1 polish | 0.1.1 | Bugfixes |
| Week 5 | Phase 2 complete | 0.2.0 | Harness features |
| Week 6 | Phase 2 polish | 0.2.1 | Bugfixes |
| Week 7 | Phase 3 complete | 0.3.0 | Advanced features |
| Week 8 | Phase 3 polish | 0.3.1 | Bugfixes |
| Week 9 | Phase 4 complete | 0.4.0 | Showcase demos |
| Week 10 | Phase 4 polish | 0.4.1 | Bugfixes |
| Week 12 | Phase 5 complete | 1.0.0 | Production release |
---
## Testing Strategy
### Unit Tests (Per Phase)
```
tests/
├── test_lilux_package.py # Package structure
├── test_bundling.py # .ai/ bundling
├── test_cli_commands.py # Entry points
├── test_server_bootstrap.py # Server init
├── test_user_space_init.py # User space
├── test_permissions.py # Phase 2
├── test_state_files.py # Phase 2
├── test_knowledge.py # Phase 2
├── test_recursion_safety.py # Phase 3
├── test_parallel_execution.py # Phase 3
└── test_orchestration_patterns.py # Phase 3-4
```
### Integration Tests
```
tests/integration/
├── test_full_init_flow.py # End-to-end init
├── test_phase_1_demos.py # All Phase 1 demos
├── test_phase_2_demos.py # All Phase 2 demos
├── test_phase_3_demos.py # All Phase 3 demos
├── test_phase_4_demos.py # All Phase 4 demos
└── test_advanced_workflows.py # Complex scenarios
```
### Manual Testing
Each phase includes:
- [ ] Test installation on clean system
- [ ] Test on macOS, Linux, Windows
- [ ] Test with different Python versions
- [ ] Test agent integration (Claude, Cursor)
- [ ] Test with vector search enabled/disabled
- [ ] Test permission system
- [ ] Test state file persistence
---
## Success Criteria
### Phase 1 (0.1.0)
- ✓ Users can install with `pipx install rye`
- ✓ Users can run `rye-init` successfully
- ✓ 4 meta tools work (search, load, execute, help)
- ✓ All Phase 1 demos run successfully
- ✓ Core directives load from bundled content
- ✓ User space initialized correctly
- ✓ Tests pass (>90% coverage)
### Phase 2 (0.2.0)
- ✓ Permission system functional
- ✓ State files work and persist
- ✓ Knowledge entries create and evolve
- ✓ All Phase 2 demos work
- ✓ Integration tests pass
- ✓ Documentation complete
- ✓ Tests pass (>85% coverage)
### Phase 3 (0.3.0)
- ✓ Deep recursion with safety guarantees
- ✓ Parallel orchestration working
- ✓ Tight context packing reduces LLM errors
- ✓ Self-evolving systems converge
- ✓ All Phase 3 demos work
- ✓ Performance benchmarks meet targets
- ✓ Tests pass (>80% coverage)
### Phase 4 (0.4.0)
- ✓ Genome evolution produces improved solutions
- ✓ Proof generation and verification work
- ✓ Software building produces working code
- ✓ Multi-agent orchestration succeeds
- ✓ Version control with checkpoints works
- ✓ All Phase 4 demos work
- ✓ Real-world examples showcase system
### Phase 5 (1.0.0)
- ✓ All tests pass (>85% coverage)
- ✓ Documentation complete and clear
- ✓ Production safety harness in place
- ✓ Installation verified on multiple systems
- ✓ User feedback incorporated
- ✓ Performance optimized
- ✓ Ready for production use
---
## Resource Allocation
### Development Team
| Role | Tasks | Phases |
|------|-------|--------|
| Core Dev | Kernel refactoring, package setup | 0, 1-5 |
| Demo Dev | Demo directives, examples | 1-5 |
| Docs | User guide, API docs, tutorials | 1-5 |
| QA | Testing, integration, platform verification | 1-5 |
| DevOps | CI/CD, PyPI releases, monitoring | 0, 1-5 |
### Time Estimate
- **Phase 0:** 1-2 weeks (refactoring)
- **Phase 1:** 1-2 weeks (foundation)
- **Phase 2:** 1-2 weeks (harness)
- **Phase 3:** 1-2 weeks (orchestration)
- **Phase 4:** 1-2 weeks (showcase)
- **Phase 5:** 1-2 weeks (polish)
**Total:** 6-12 weeks to production 1.0.0
---
## Risk Mitigation
### Risk: Import changes break existing code
**Mitigation:**
- Keep `kiwi_mcp` as compatibility layer in 0.1.0
- Deprecation warnings added
- Clear migration guide provided
### Risk: Package bundling doesn't work on all platforms
**Mitigation:**
- Test building on macOS, Linux, Windows
- Test bundling with different Python versions
- Fallback mechanisms in code
### Risk: User space creation fails
**Mitigation:**
- Handle permission errors gracefully
- Suggest alternative locations
- Clear error messages
### Risk: Demos are too complex
**Mitigation:**
- Start with very simple demos
- Progressive complexity
- Guided walkthroughs
- Example outputs
### Risk: Vector search setup is complicated
**Mitigation:**
- Make it optional
- Provide clear setup guide
- Fallback to keyword search
- Test thoroughly
---
## Dependencies & Integration
### PyPI Dependencies
Core:
- `pydantic >= 2.0` (validation)
- `pyyaml >= 6.0` (config)
- `requests >= 2.28` (HTTP)
- `click >= 8.0` (CLI)
Optional:
- `sentence-transformers >= 2.2` (vector search)
- `numpy >= 1.21` (math operations)
### Integration Points
- **MCP Clients:** Claude, Cursor, other LLM platforms
- **Vector Databases:** Local, OpenAI embeddings, HuggingFace
- **Package Managers:** pipx, pip, conda
- **CI/CD:** GitHub Actions, pytest, coverage
---
## Next Steps
### Immediate (This Week)
1. Review all 5 documents
2. Get stakeholder approval
3. Create GitHub project/issues
4. Set up dev environment
### Week 1
1. Begin Phase 0 (refactoring)
2. Create `lilux/` directory structure
3. Start import migration
4. Set up package configuration
### Week 2
1. Complete Phase 0 refactoring
2. Test building package locally
3. Create test structure
4. Prepare for Phase 1
### Week 3
1. Implement Phase 1 foundation
2. Create first demo directives
3. User space initialization
4. Initial PyPI release
---
## Communication
### Weekly Updates
- What's completed
- What's in progress
- Blockers/issues
- Demo walkthrough
### User Communication
- Pre-release: Beta testing signup
- Release day: Announcement + quick start guide
- Post-release: Docs + demo videos
### Documentation
- Keep docs/ updated with each phase
- Create video tutorials for demos
- Blog posts for major features
- Community Q&A session
---
## Success Definition
**Success = Users can:**
1. **Install easily:** `pipx install rye` (5 minutes)
2. **Initialize:** `rye-init` creates user space (2 minutes)
3. **Learn:** Demos teach from basic to advanced (2-4 hours)
4. **Build:** Create their own directives and systems
5. **Evolve:** Self-improving systems via state + knowledge
6. **Trust:** Safety guarantees (recursion limits, permissions, cost)
7. **Scale:** From simple scripts to complex orchestrations
**By the end:** Users are confident building AI-native execution systems.
---
## Conclusion
This roadmap transforms Lilux/RYE from concept to production in 12 weeks:
- **Week 3:** First release (0.1.0)
- **Week 4-8:** Feature additions (0.2-0.4)
- **Week 12:** Production release (1.0.0)
Users get:
- Single installation: `pipx install rye`
- Complete kernel + essential content
- Progressive learning path (17 demos)
- Advanced capabilities (recursion, parallel, evolution)
- Safety guarantees (permissions, cost, timeouts)
This is AI-native execution made practical.
---
_Roadmap: 12-week journey to production_
_Last Updated: 2026-01-28_
_Status: Ready for implementation_